Returns the length of a file in bytes.
ファイルのサイズをバイト単位で返します。
FileLen (Text As String)
FileLen (Text As String)
Long
ロング整数
Text: Any string expression that contains an unambiguous file specification. You can also use URL notation.
Text: ファイルの位置を明示的に指定した文字列表式。またURL 指定を用いることもできます。
This function determines the length of a file. If the FileLen function is called for an open file, it returns the file length before it was opened. To determine the current file length of an open file, use the Lof function.
この関数は、指定ファイルのサイズを取得するものです。オープン済みのファイルに対して FileLen 関数を使用すると、オープンした時点でのファイルサイズを返します。こうしたオープン済みファイルに対して、現在のファイルサイズを取得するのであれば、Lof 関数を使用する必要があります。
Sub ExampleFileLen
Sub ExampleFileLen
msgbox FileLen("C:\autoexec.bat")
msgbox FileLen("C:\autoexec.bat")
end sub
end sub